<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title></title>
		<link href="styles/marc.css" rel="stylesheet" type="text/css"/>
		<script src="js/jquery-1.11.0.min.js"></script>
		
		<script type="text/javascript">
		$(document).ready(function()
		{
			$.ajax({ 
		  		url:"/marc/ApplicationDataService",
				type:'POST',
				dataType:"json",
				data:{'requestType':'gatherApplicationSettings'},
				success: function(html)
				{
					var settings = html['AppSettings'];
					$('title').append(settings['appname'] + ' - ' + settings['parishname']);
					$('#marc_appNameH1').append(settings['appname'] + ' - ' + settings['parishname']);
					$('#marc_bottomnav').append(settings['appname'] + ' v' + settings['version'] + ' - Copyright ' + settings['copyrightYear']);
				},
				error: function(html){
					alert("An error has occurred!");
				}
			}); //Closes ajax
			
			//TODO authenticate on form submit
		});
		</script>
	</head>
	
	<body>
		<div id="marc_wrapper">
			<div id="marc_header">
				<h1 id="marc_appNameH1"></h1>
			</div>
			<div id="marc_topnav"></div>
			<div id="marc_appBody">
				<center>
					<form action="LoginServlet" method="post">
						Username: <input type="text" name="user">
						<br>
						Password: <input type="password" name="pwd">
						<br>
						<input type="submit" value="Login">
					</form>
				</center>
			</div>
			<div id="marc_bottomnav"></div>
		</div>
	</body>
</html>